//
//  BaseController.m
//  万物记
//
//  Created by Ajen on 2019/6/14.
//  Copyright © 2019 Ajen. All rights reserved.
//

#import "BaseController.h"

@interface BaseController ()<UINavigationControllerDelegate,UIGestureRecognizerDelegate>

@end

@implementation BaseController

- (void)viewDidLoad {
    [super viewDidLoad];
}

-(UIBarButtonItem *)rt_customBackItemWithTarget:(id)target action:(SEL)action{
    UIButton *btn = [UIButton buttonWithType:UIButtonTypeCustom];
    [btn setImage:[UIImage imageNamed:@"返回"] forState:UIControlStateNormal];
    [btn sizeToFit];
    [btn setImageEdgeInsets:UIEdgeInsetsMake(6, 6, 6, 6)];
    [btn addTarget:target action:action forControlEvents:UIControlEventTouchUpInside];
    return [[UIBarButtonItem alloc] initWithCustomView:btn];
}

-(BOOL)gestureRecognizerShouldBegin:(UIGestureRecognizer *)gestureRecognizer{
    return YES;
}
-(void)onTapNavLeftBtn{
    [self.navigationController popViewControllerAnimated:YES];
}

@end
